package cn.zcib.tms.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class OrderExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public OrderExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andOIdIsNull() {
            addCriterion("o_id is null");
            return (Criteria) this;
        }

        public Criteria andOIdIsNotNull() {
            addCriterion("o_id is not null");
            return (Criteria) this;
        }

        public Criteria andOIdEqualTo(Integer value) {
            addCriterion("o_id =", value, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdNotEqualTo(Integer value) {
            addCriterion("o_id <>", value, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdGreaterThan(Integer value) {
            addCriterion("o_id >", value, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("o_id >=", value, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdLessThan(Integer value) {
            addCriterion("o_id <", value, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdLessThanOrEqualTo(Integer value) {
            addCriterion("o_id <=", value, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdIn(List<Integer> values) {
            addCriterion("o_id in", values, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdNotIn(List<Integer> values) {
            addCriterion("o_id not in", values, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdBetween(Integer value1, Integer value2) {
            addCriterion("o_id between", value1, value2, "oId");
            return (Criteria) this;
        }

        public Criteria andOIdNotBetween(Integer value1, Integer value2) {
            addCriterion("o_id not between", value1, value2, "oId");
            return (Criteria) this;
        }

        public Criteria andOSeIdIsNull() {
            addCriterion("o_se_id is null");
            return (Criteria) this;
        }

        public Criteria andOSeIdIsNotNull() {
            addCriterion("o_se_id is not null");
            return (Criteria) this;
        }

        public Criteria andOSeIdEqualTo(Integer value) {
            addCriterion("o_se_id =", value, "oSeId");
            return (Criteria) this;
        }

        public Criteria andOSeIdNotEqualTo(Integer value) {
            addCriterion("o_se_id <>", value, "oSeId");
            return (Criteria) this;
        }

        public Criteria andOSeIdGreaterThan(Integer value) {
            addCriterion("o_se_id >", value, "oSeId");
            return (Criteria) this;
        }

        public Criteria andOSeIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("o_se_id >=", value, "oSeId");
            return (Criteria) this;
        }

        public Criteria andOSeIdLessThan(Integer value) {
            addCriterion("o_se_id <", value, "oSeId");
            return (Criteria) this;
        }

        public Criteria andOSeIdLessThanOrEqualTo(Integer value) {
            addCriterion("o_se_id <=", value, "oSeId");
            return (Criteria) this;
        }

        public Criteria andOSeIdIn(List<Integer> values) {
            addCriterion("o_se_id in", values, "oSeId");
            return (Criteria) this;
        }

        public Criteria andOSeIdNotIn(List<Integer> values) {
            addCriterion("o_se_id not in", values, "oSeId");
            return (Criteria) this;
        }

        public Criteria andOSeIdBetween(Integer value1, Integer value2) {
            addCriterion("o_se_id between", value1, value2, "oSeId");
            return (Criteria) this;
        }

        public Criteria andOSeIdNotBetween(Integer value1, Integer value2) {
            addCriterion("o_se_id not between", value1, value2, "oSeId");
            return (Criteria) this;
        }

        public Criteria andOSeCateIsNull() {
            addCriterion("o_se_cate is null");
            return (Criteria) this;
        }

        public Criteria andOSeCateIsNotNull() {
            addCriterion("o_se_cate is not null");
            return (Criteria) this;
        }

        public Criteria andOSeCateEqualTo(Integer value) {
            addCriterion("o_se_cate =", value, "oSeCate");
            return (Criteria) this;
        }

        public Criteria andOSeCateNotEqualTo(Integer value) {
            addCriterion("o_se_cate <>", value, "oSeCate");
            return (Criteria) this;
        }

        public Criteria andOSeCateGreaterThan(Integer value) {
            addCriterion("o_se_cate >", value, "oSeCate");
            return (Criteria) this;
        }

        public Criteria andOSeCateGreaterThanOrEqualTo(Integer value) {
            addCriterion("o_se_cate >=", value, "oSeCate");
            return (Criteria) this;
        }

        public Criteria andOSeCateLessThan(Integer value) {
            addCriterion("o_se_cate <", value, "oSeCate");
            return (Criteria) this;
        }

        public Criteria andOSeCateLessThanOrEqualTo(Integer value) {
            addCriterion("o_se_cate <=", value, "oSeCate");
            return (Criteria) this;
        }

        public Criteria andOSeCateIn(List<Integer> values) {
            addCriterion("o_se_cate in", values, "oSeCate");
            return (Criteria) this;
        }

        public Criteria andOSeCateNotIn(List<Integer> values) {
            addCriterion("o_se_cate not in", values, "oSeCate");
            return (Criteria) this;
        }

        public Criteria andOSeCateBetween(Integer value1, Integer value2) {
            addCriterion("o_se_cate between", value1, value2, "oSeCate");
            return (Criteria) this;
        }

        public Criteria andOSeCateNotBetween(Integer value1, Integer value2) {
            addCriterion("o_se_cate not between", value1, value2, "oSeCate");
            return (Criteria) this;
        }

        public Criteria andOStartTimeIsNull() {
            addCriterion("o_start_time is null");
            return (Criteria) this;
        }

        public Criteria andOStartTimeIsNotNull() {
            addCriterion("o_start_time is not null");
            return (Criteria) this;
        }

        public Criteria andOStartTimeEqualTo(Date value) {
            addCriterion("o_start_time =", value, "oStartTime");
            return (Criteria) this;
        }

        public Criteria andOStartTimeNotEqualTo(Date value) {
            addCriterion("o_start_time <>", value, "oStartTime");
            return (Criteria) this;
        }

        public Criteria andOStartTimeGreaterThan(Date value) {
            addCriterion("o_start_time >", value, "oStartTime");
            return (Criteria) this;
        }

        public Criteria andOStartTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("o_start_time >=", value, "oStartTime");
            return (Criteria) this;
        }

        public Criteria andOStartTimeLessThan(Date value) {
            addCriterion("o_start_time <", value, "oStartTime");
            return (Criteria) this;
        }

        public Criteria andOStartTimeLessThanOrEqualTo(Date value) {
            addCriterion("o_start_time <=", value, "oStartTime");
            return (Criteria) this;
        }

        public Criteria andOStartTimeIn(List<Date> values) {
            addCriterion("o_start_time in", values, "oStartTime");
            return (Criteria) this;
        }

        public Criteria andOStartTimeNotIn(List<Date> values) {
            addCriterion("o_start_time not in", values, "oStartTime");
            return (Criteria) this;
        }

        public Criteria andOStartTimeBetween(Date value1, Date value2) {
            addCriterion("o_start_time between", value1, value2, "oStartTime");
            return (Criteria) this;
        }

        public Criteria andOStartTimeNotBetween(Date value1, Date value2) {
            addCriterion("o_start_time not between", value1, value2, "oStartTime");
            return (Criteria) this;
        }

        public Criteria andOEndTimeIsNull() {
            addCriterion("o_end_time is null");
            return (Criteria) this;
        }

        public Criteria andOEndTimeIsNotNull() {
            addCriterion("o_end_time is not null");
            return (Criteria) this;
        }

        public Criteria andOEndTimeEqualTo(Date value) {
            addCriterion("o_end_time =", value, "oEndTime");
            return (Criteria) this;
        }

        public Criteria andOEndTimeNotEqualTo(Date value) {
            addCriterion("o_end_time <>", value, "oEndTime");
            return (Criteria) this;
        }

        public Criteria andOEndTimeGreaterThan(Date value) {
            addCriterion("o_end_time >", value, "oEndTime");
            return (Criteria) this;
        }

        public Criteria andOEndTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("o_end_time >=", value, "oEndTime");
            return (Criteria) this;
        }

        public Criteria andOEndTimeLessThan(Date value) {
            addCriterion("o_end_time <", value, "oEndTime");
            return (Criteria) this;
        }

        public Criteria andOEndTimeLessThanOrEqualTo(Date value) {
            addCriterion("o_end_time <=", value, "oEndTime");
            return (Criteria) this;
        }

        public Criteria andOEndTimeIn(List<Date> values) {
            addCriterion("o_end_time in", values, "oEndTime");
            return (Criteria) this;
        }

        public Criteria andOEndTimeNotIn(List<Date> values) {
            addCriterion("o_end_time not in", values, "oEndTime");
            return (Criteria) this;
        }

        public Criteria andOEndTimeBetween(Date value1, Date value2) {
            addCriterion("o_end_time between", value1, value2, "oEndTime");
            return (Criteria) this;
        }

        public Criteria andOEndTimeNotBetween(Date value1, Date value2) {
            addCriterion("o_end_time not between", value1, value2, "oEndTime");
            return (Criteria) this;
        }

        public Criteria andOCreateTimeIsNull() {
            addCriterion("o_create_time is null");
            return (Criteria) this;
        }

        public Criteria andOCreateTimeIsNotNull() {
            addCriterion("o_create_time is not null");
            return (Criteria) this;
        }

        public Criteria andOCreateTimeEqualTo(Date value) {
            addCriterion("o_create_time =", value, "oCreateTime");
            return (Criteria) this;
        }

        public Criteria andOCreateTimeNotEqualTo(Date value) {
            addCriterion("o_create_time <>", value, "oCreateTime");
            return (Criteria) this;
        }

        public Criteria andOCreateTimeGreaterThan(Date value) {
            addCriterion("o_create_time >", value, "oCreateTime");
            return (Criteria) this;
        }

        public Criteria andOCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("o_create_time >=", value, "oCreateTime");
            return (Criteria) this;
        }

        public Criteria andOCreateTimeLessThan(Date value) {
            addCriterion("o_create_time <", value, "oCreateTime");
            return (Criteria) this;
        }

        public Criteria andOCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("o_create_time <=", value, "oCreateTime");
            return (Criteria) this;
        }

        public Criteria andOCreateTimeIn(List<Date> values) {
            addCriterion("o_create_time in", values, "oCreateTime");
            return (Criteria) this;
        }

        public Criteria andOCreateTimeNotIn(List<Date> values) {
            addCriterion("o_create_time not in", values, "oCreateTime");
            return (Criteria) this;
        }

        public Criteria andOCreateTimeBetween(Date value1, Date value2) {
            addCriterion("o_create_time between", value1, value2, "oCreateTime");
            return (Criteria) this;
        }

        public Criteria andOCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("o_create_time not between", value1, value2, "oCreateTime");
            return (Criteria) this;
        }

        public Criteria andOUidIsNull() {
            addCriterion("o_uid is null");
            return (Criteria) this;
        }

        public Criteria andOUidIsNotNull() {
            addCriterion("o_uid is not null");
            return (Criteria) this;
        }

        public Criteria andOUidEqualTo(Integer value) {
            addCriterion("o_uid =", value, "oUid");
            return (Criteria) this;
        }

        public Criteria andOUidNotEqualTo(Integer value) {
            addCriterion("o_uid <>", value, "oUid");
            return (Criteria) this;
        }

        public Criteria andOUidGreaterThan(Integer value) {
            addCriterion("o_uid >", value, "oUid");
            return (Criteria) this;
        }

        public Criteria andOUidGreaterThanOrEqualTo(Integer value) {
            addCriterion("o_uid >=", value, "oUid");
            return (Criteria) this;
        }

        public Criteria andOUidLessThan(Integer value) {
            addCriterion("o_uid <", value, "oUid");
            return (Criteria) this;
        }

        public Criteria andOUidLessThanOrEqualTo(Integer value) {
            addCriterion("o_uid <=", value, "oUid");
            return (Criteria) this;
        }

        public Criteria andOUidIn(List<Integer> values) {
            addCriterion("o_uid in", values, "oUid");
            return (Criteria) this;
        }

        public Criteria andOUidNotIn(List<Integer> values) {
            addCriterion("o_uid not in", values, "oUid");
            return (Criteria) this;
        }

        public Criteria andOUidBetween(Integer value1, Integer value2) {
            addCriterion("o_uid between", value1, value2, "oUid");
            return (Criteria) this;
        }

        public Criteria andOUidNotBetween(Integer value1, Integer value2) {
            addCriterion("o_uid not between", value1, value2, "oUid");
            return (Criteria) this;
        }

        public Criteria andOFlagIsNull() {
            addCriterion("o_flag is null");
            return (Criteria) this;
        }

        public Criteria andOFlagIsNotNull() {
            addCriterion("o_flag is not null");
            return (Criteria) this;
        }

        public Criteria andOFlagEqualTo(Integer value) {
            addCriterion("o_flag =", value, "oFlag");
            return (Criteria) this;
        }

        public Criteria andOFlagNotEqualTo(Integer value) {
            addCriterion("o_flag <>", value, "oFlag");
            return (Criteria) this;
        }

        public Criteria andOFlagGreaterThan(Integer value) {
            addCriterion("o_flag >", value, "oFlag");
            return (Criteria) this;
        }

        public Criteria andOFlagGreaterThanOrEqualTo(Integer value) {
            addCriterion("o_flag >=", value, "oFlag");
            return (Criteria) this;
        }

        public Criteria andOFlagLessThan(Integer value) {
            addCriterion("o_flag <", value, "oFlag");
            return (Criteria) this;
        }

        public Criteria andOFlagLessThanOrEqualTo(Integer value) {
            addCriterion("o_flag <=", value, "oFlag");
            return (Criteria) this;
        }

        public Criteria andOFlagIn(List<Integer> values) {
            addCriterion("o_flag in", values, "oFlag");
            return (Criteria) this;
        }

        public Criteria andOFlagNotIn(List<Integer> values) {
            addCriterion("o_flag not in", values, "oFlag");
            return (Criteria) this;
        }

        public Criteria andOFlagBetween(Integer value1, Integer value2) {
            addCriterion("o_flag between", value1, value2, "oFlag");
            return (Criteria) this;
        }

        public Criteria andOFlagNotBetween(Integer value1, Integer value2) {
            addCriterion("o_flag not between", value1, value2, "oFlag");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}